﻿using System.Collections.Generic;

namespace winS.Unity.Process
{
    public class RandomStep : GeneralStep
    {
        public override IEnumerable<string> GetSubsequentSteps(ProcessContext processContext)
        {
            switch (nextStepsList.Count)
            {
                case 0: yield break;
                case 1: yield return nextStepsList[0]; break;
                default: yield return nextStepsList[Random.Int(nextStepsList.Count)]; break;
            }
        }
    }
}